<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卖家-修改个人信息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>

<script type="text/javascript" src="<?php echo $this->_webroot('servtools/jquery-1.3.2.min.js?v=1.3.2'); ?>"></script>
<script type="text/javascript" src="<?php echo $this->_webroot('servtools/xheditor/xheditor.min.js?v=1.0.0-final'); ?>"></script>
<script type="text/javascript">
var introeditor;
$(function(){
	introeditor=$("#shop_intro").xheditor({skin:'vista',tools:"Cut,Copy,Paste,Pastetext,Separator,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,Separator,Align,List,Outdent,Indent,Separator,Link,Unlink,Img,Table,Separator,Source,Fullscreen,About"});

});
</script>

</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
    </div>
    
    <div class="main-right">
    	<!-- vip设置 -->
    	<div class="vipSet_div">
        <form id="UserRegisterForm" method="post" action="<?php echo $this->_url('user/profile');?>">		
        	<span class="vipSet">修改个人信息 <font color=red><?php if( $msg ) echo '['.$msg.']';?></font></span>			
            <div class="vipSet_content">
            	<span>真实姓名</span>
                <input type="text" name="data[userinfo][user_truename]" value="<?php echo $oneuserinfo[userinfo][user_truename];?>" class="vipSet_input1"  maxlength="20" />
            </div>	
			
            <div class="vipSet_content">
			    <span>出生日期</span>
                                                                <select name="data[userinfo][user_birthday][year]">
									                                <option value="0">年</option>
																	<?php for ( $i=1950 ; $i<=2013; $i++ ) { ?>
																	<option value="<?php echo $i; ?>"  <?php  if( $i==date('Y', strtotime($oneuserinfo['userinfo']['user_birthday']))){echo 'selected';}?> ><?php echo $i; ?></option>
																	<?php } ?>
																</select>
								                               <select name="data[userinfo][user_birthday][month]">
									                                <option value="0">月</option>
																	<?php for ( $i=1 ; $i<=12; $i++) { ?>
																	<option value="<?php echo $i; ?>"  <?php  if( $i==date('m', strtotime($oneuserinfo['userinfo']['user_birthday']))){echo 'selected';}?> ><?php echo $i; ?></option>
																	<?php } ?>																	
																</select>
								                                <select name="data[userinfo][user_birthday][day]">
									                                <option value="0">日</option>
																	<?php for ( $i=1 ; $i<=31; $i++) { ?>
																	<option value="<?php echo $i; ?>" <?php  if( $i==date('d', strtotime($oneuserinfo['userinfo']['user_birthday']))){echo 'selected';}?> ><?php echo $i; ?></option>
																	<?php } ?>
																</select>	
			
			</div>
			
            <div class="vipSet_content">
            	<span>性别</span>
                <input type="radio" name="data[userinfo][user_gender]" value="0" <?php if('0'==$oneuserinfo['userinfo']['user_gender']){?>checked<?php } ?>  />保密 
				<input type="radio" name="data[userinfo][user_gender]" value="1" <?php if('1'==$oneuserinfo['userinfo']['user_gender']){?>checked<?php } ?> />男 
				<input type="radio" name="data[userinfo][user_gender]" value="2" <?php if('2'==$oneuserinfo['userinfo']['user_gender']){?>checked<?php } ?> />女
            </div>	

            <div class="vipSet_content">
            	<span>婚烟</span>
                <input type="radio" name="data[userinfo][user_marry]" value="0" <?php if('0'==$oneuserinfo['userinfo']['user_marry']){?>checked<?php } ?> />保密 
				<input type="radio" name="data[userinfo][user_marry]" value="1" <?php if('1'==$oneuserinfo['userinfo']['user_marry']){?>checked<?php } ?> />未婚 
				<input type="radio" name="data[userinfo][user_marry]" value="2" <?php if('2'==$oneuserinfo['userinfo']['user_marry']){?>checked<?php } ?> />已婚
            </div>	

            <div class="vipSet_content">
            	<span>手机</span>
                <input type="text" name="data[userinfo][user_mobile]" value="<?php echo $oneuserinfo[userinfo][user_mobile];?>" maxlength="20" />
            </div>	

            <div class="vipSet_content">
            	<span>电话</span>
                <input type="text" name="data[userinfo][user_telphone]" value="<?php echo $oneuserinfo[userinfo][user_telphone];?>" maxlength="20" />
            </div>
			
<!--            <div class="vipSet_content">
            	<span>MSN</span>
                <input type="text" name="data[userinfo][user_msn]" value="<?php echo $oneuserinfo[userinfo][user_msn];?>"  maxlength="50" />
            </div>	
-->	
            <div class="vipSet_content">
            	<span>QQ</span>
                <input type="text" name="data[userinfo][user_qq]" value="<?php echo $oneuserinfo[userinfo][user_qq];?>" maxlength="15" />
            </div>	

            <div class="vipSet_content">
            	<span>所在地区</span>
								<span id="user_country">
								<select name="data[userinfo][user_country]" onchange="areachanged(this.value,0);">
									<option value='0'>选择国家</option>
								 <?php   foreach($areas_info[0] as $v){?>
									<option value="<?php echo  $v['id'];?>" <?php  if($v['id']==$oneuserinfo[userinfo]['user_country']){echo 'selected';}?>><?php echo  $v['area_name'];?></option>
								<?php }?>
								</select>
								</span>
								
								<span id="user_province"><?php  if($oneuserinfo[userinfo]['user_country']){?>
								<select name="data[userinfo][user_province]" onchange="areachanged(this.value,1);">
									<option value='0'>选择省份</option>
								<?php foreach($areas_info[1] as $v) {
										if($v['parent_id'] == $oneuserinfo[userinfo]['user_country']){?>
									<option value="<?php echo  $v['id'];?>" <?php   if($v['id']==$oneuserinfo[userinfo]['user_province']){echo 'selected';}?>><?php echo  $v['area_name'];?></option>
								<?php 	}
								}?>
								</select>
								<?php }?>
								</span>
								
								<span id="user_city">
								<?php 	 if($oneuserinfo[userinfo]['user_province']){?>
								<select name="data[userinfo][user_city]" onchange="areachanged(this.value,2);">
									<option value='0'>选择城市</option>
								    <?php foreach($areas_info[2] as $v) {
										if($v['parent_id'] == $oneuserinfo[userinfo]['user_province']){?>
									<option value="<?php echo  $v['id'];?>" <?php  if($v['id']==$oneuserinfo[userinfo]['user_city']){echo 'selected';}?>><?php echo  $v['area_name'];?></option>
								<?php 	}
								}?></select>
								<?php }?>
								</span>
								
								<span id="user_district">
								<?php  if($oneuserinfo[userinfo]['user_city']) {?>
								<select name="data[userinfo][user_district]">
									<option value='0'>选择地区</option>
								<?php foreach($areas_info[3] as $v) {
										if($v['parent_id'] == $oneuserinfo[userinfo]['user_city']){?>
									<option value="<?php echo  $v['id'];?>" <?php   if($v['id']==$oneuserinfo[userinfo]['user_district']){echo 'selected';}?>><?php echo  $v['area_name'];?></option>
								<?php 	}
								}?>
								</select>
								<?php }?>
								</span>
            </div>	

            <div class="vipSet_content">
            	<span>详细地址</span>
                <input type="text" name="data[userinfo][user_address]" value="<?php echo $oneuserinfo[userinfo][user_address];?>" style="width:250px;" maxlength="200" />
            </div>
			
            <div class="vipSet_content">
            	<span>邮政编码</span>
                <input type="text" name="data[userinfo][user_zipcode]" value="<?php echo $oneuserinfo[userinfo][user_zipcode];?>" maxlength="6" />
            </div>	
			

            <div class="vipSet_content">
				<input type="submit" value="提交" class="vipSet_input3" />
            </div>
            </form>				
        </div>
    	<!-- vip设置 end -->
        

    </div>
    <div class="clear"></div>
</div>

<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>


<script language="JavaScript" src="<?php echo $this->_webroot('servtools/ajax_client/ajax.js');?>"></script>
<script language="JavaScript">
<!--
function areachanged(value,type){
	if(value > 0) {	
		ajax("<?php echo $this->_url('user/getareas');?>","POST","value="+value+"&mode=userinfo&pre=user_&type="+type,function(return_text){
			var return_text = return_text.replace(/[\n\r]/g,"");
			if(return_text==""){
				alert("请重新选择!！");
			} else {
				if(type==0) {
					document.getElementById("user_province").innerHTML = return_text;
					show("user_province");
					hide("user_city");
					hide("user_district");
				} else if(type==1) {
					document.getElementById("user_city").innerHTML = return_text;
					show("user_city");
					hide("user_district");
				} else if(type==2) {
					document.getElementById("user_district").innerHTML = return_text;
					show("user_district");
				}
			}
		});
	} else {
		if(type==2) {
			hide("user_district");
		} else if(type==1) {
			hide("user_district");
			hide("user_city");
		} else if(type==0) {
			hide("user_district");
			hide("user_city");
			hide("user_province");
		}
	}
}

function hide(id) {
	document.getElementById(id).style.display = 'none';
}

function show(id) {
	document.getElementById(id).style.display = '';
}
//-->
</script>
</body>
</html>